package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 弹性单价实体类
 *
 * @author 范学春
 */
public class FlexiblePriceEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -1639079882332635889L;

    private Long FlexiblePriceId;
    private Long SupplierId;
    private String SupplierName;
    private Double UnitPrice;
    private String Description;

    public Long getFlexiblePriceId() {
        return FlexiblePriceId;
    }

    public Long getSupplierId() {
        return SupplierId;
    }

    public String getSupplierName() {
        return SupplierName;
    }

    public Double getUnitPrice() {
        return UnitPrice;
    }

    public String getDescription() {
        return Description;
    }

    public void setFlexiblePriceId(Long FlexiblePriceId) {
        this.FlexiblePriceId = FlexiblePriceId;
    }

    public void setSupplierId(Long SupplierId) {
        this.SupplierId = SupplierId;
    }

    public void setSupplierName(String SupplierName) {
        this.SupplierName = SupplierName;
    }

    public void setUnitPrice(Double UnitPrice) {
        this.UnitPrice = UnitPrice;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof FlexiblePriceEntity)) {
            return false;
        }

        final FlexiblePriceEntity that = (FlexiblePriceEntity) o;

        return new EqualsBuilder()
                .append(this.getFlexiblePriceId(), that.getFlexiblePriceId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getFlexiblePriceId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
